import httpAxios from '../utils/httpAxios'

// 分页获取角色
export const getrole = (data: object) => {
    return httpAxios.post('/getmenelist', data)
}

// 获取所有角色
export const getrolelist = () => {
    return httpAxios.get('/getrole')
}

// 新增角色
export const addrole = (data: object) => {
    return httpAxios.post('/addrole', data)
}

// 搜索角色
export const searchrole = (name: string) => {
    return httpAxios.post('/searchrole', { name })
}

// 删除角色
export const delrole = (id: number) => {
    return httpAxios.post('/delrole', { id })
}